<html>
<head>
  <title>Destroy and Hide Element in Transition End Event</title>
  <style type="text/css" media="screen">
    .box {
      height: 100px;
      width: 100px;
      margin: 10px;
      background-color: blue;
      transition-property: transform;
      transition-duration: 0.1s;
    }
  </style>
  <script type="text/javascript" charset="utf-8">
    var numDone = 0;
    function transitionEnded()
    {
        parent.testFinished();
    }

    function startTest()
    {
        var box1 = document.getElementById('box1');
        box1.addEventListener('transitionend', function() {
            transitionEnded();
        }, false);
        box1.style.transform = 'translate(100px, 0)';
    }
    
    window.addEventListener('load', startTest, false);
  </script>
</head>
<body>

<p>Tests element removal of iframe in transitionend event handler. Should not crash.</p>

<div id="container">
  <div id="box1" class="box"></div>
</div>
<div id="results"></div>
</body>
</html>
